<template>
    <div class="emp-entry">
        <div class="header">
            <ul>
                <li class="header-title">
                    新员工入职
                </li>
                <li class="header-operate">
                    <el-button type="primary" size="small" @click="submit" style="width: 70px">提交</el-button>
                    <el-button type="default" size="small" @click="goBack" style="width: 50px">返回</el-button>
                </li>
            </ul>
        </div>
        <div class="entry-info">
            <w-tab>
                <w-tab-row title="员工基本信息" :colspan="rowColspan"/>
                <w-tab-row>
                    <w-tab-td title="员工姓名"/>
                    <w-tab-td :content="empForm.empName"/>
                    <w-tab-td title="联系方式"/>
                    <w-tab-td :content="empForm.phone"/>
                </w-tab-row>
                <w-tab-row>
                    <w-tab-td title="所在部门"/>
                    <w-tab-td :content="empForm.deptName"/>
                    <w-tab-td title="岗位"/>
                    <w-tab-td :content="empForm.position"/>
                </w-tab-row>
                <w-tab-row>
                    <w-tab-td title="上级名称"/>
                    <w-tab-td :content="empForm.superior" colspan="3"/>
                </w-tab-row>

                <w-tab-row title="合同信息" :colspan="rowColspan"/>
                <w-tab-row>
                    <w-tab-td title="雇佣形式"/>
                    <w-tab-td :content="empForm.hireForm"/>
                    <w-tab-td title="入职状态"/>
                    <w-tab-td :content="empForm.status"/>
                </w-tab-row>
            </w-tab>
        </div>
    </div>
</template>

<script>

import WTab from "../../com/table/WTab.vue";
import WTabRow from "../../com/table/WTabRow.vue";
import WTabTd from "../../com/table/WTabTd.vue";
import {getResumeById} from "../../../network/resume";
export default {
    name: "EmpEntryTransact",
    components: {WTabTd, WTabRow, WTab},
    data(){
        return{
            type: 0,//0为添加表单，1为修改表单
            title: '',//表单名称
            visible: false,//是否展示
            empForm:{
                empName: '王斌',
                deptName: '技术部',
                position: 'Java开发人员',
                superior: '李明',
                phone: 1234546576,
                hireForm: '劳务工',
                status: '试用',
                // status:
                // resumeId: null,
                // deptId: 1,
                // rankId: 2,
                // positionId: 3,
                // superiorId: 4,
            },
            rowColspan: 4
        }
    },
    methods:{
        async submit(){
            console.log('aaa')

        },
        goBack(){
            this.$operate.confirm({
                title: '取消操作',
                hint: '你确定要取消入职吗',
                executeFn:()=>{
                    this.$router.go(-1);
                }
            })
        },
        checkFormParams(){
            return true;
        },
        init(){

        }
    },
    created() {
        let id = this.$route.params.id;

        this.init();
    }
}
</script>

<style scoped>
*{
    /*border: 1px solid red;*/
}
.emp-entry{

}
.entry-info{
    margin: 0 auto;
    width: 1200px;
}
.header{
    margin: 0 auto;
    width: 1200px;
    height: 40px;
    box-sizing: border-box;
    padding: 10px 0 0;
    letter-spacing: 2px;
}
.header-title{
    font-size: 18px;
    color: #666666;
    font-weight: 600;
}
.header-operate{
    float: right;
}
</style>

